//
//  Config.h
//  MobileChecker
//
//  Created by Lymons on 15-1-28.
//  Copyright (c) 2015年 Lymons. All rights reserved.
//

#ifndef MobileChecker_Config_h
#define MobileChecker_Config_h

@class NSError;

typedef void (^ReturnValueBlock) (id returnValue);
typedef void (^ErrorCodeBlock) (id errorCode);
typedef void (^FailureBlock)(NSError *error);
typedef void (^NetWorkBlock)(BOOL netConnetState);

#define DDLog(xx, ...) NSLog(@"%s(%d): " xx, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

#define KEY_AUTHCD          @"authCd"
#define KEY_ASSESSMENT      @"ASSESSMENT_NO"
#define KEY_SUCCEEDMESSAGE  @"MESSAGE"
#define KEY_ROOT            @"CHECKRESULT"
#define KEY_AUTHID          @"AUTH_ID"
#define KEY_SHOPCD          @"SHOP_CD"
#define KEY_IMEI            @"IMEI"
#define KEY_IMEI_INPUT      @"IMEI_INPUT"
#define KEY_CAREER          @"CAREER"
#define KEY_MAKER           @"MAKER"
#define KEY_MODEL           @"MODEL"
#define KEY_MODEL_NAME      @"MODEL_NAME"
#define KEY_VOLUME          @"VOLUME"
#define KEY_OS              @"OS"
#define KEY_SENSOR          @"SENSOR"
#define KEY_SENSOR_DETAILS  @"SENSOR_DETAILS"
#define KEY_COMMUNICATION   @"COMMUNICATION"
#define KEY_TOUCH_PANEL     @"TOUCH_PANEL"
#define KEY_VIBRATION       @"VIBRATION"
#define KEY_SPEAKER         @"SPEAKER"
#define KEY_MIKE            @"MIKE"
#define KEY_CAMERA          @"CAMERA"
#define KEY_LIQUID_CRYSTAL  @"LIQUID_CRYSTAL"
#define KEY_CAMERA          @"CAMERA"
#define KEY_BATTERY         @"BATTERY"
#define KEY_SIM             @"SIM"
#define KEY_SD              @"SD"
#define KEY_VERSION         @"APP_VERSION"
#define KEY_DIAGNOSTICS_RESULT          @"DIAGNOSTICS_RESULT"
#define KEY_COMMUNICATION_DETAILS       @"COMMUNICATION_DETAILS"
#define VALUE_SENSOR(a, b, c, d)        [NSString stringWithFormat:@"ジャイロ=%@,磁気=%@,近接=%@,輝度=%@", a, b, c, d]
#define VALUE_COMMUNICATION(a, b)       [NSString stringWithFormat:@"Wi-Fi=%@,Bluetooth=%@", a, b]

#define RESP_KEY_ASSE       @"PROVISIONAL_ASSE_USE_FLG"
#define RESP_KEY_COMPANYID  @"OVERALL_COMPANY_ID"
#define RESP_VLU_COMPANYID  @"FPN"
#define RESP_KEY_MESSAGE1   @"MESSAGE1"
#define RESP_KEY_MESSAGE2   @"MESSAGE2"
#define RESP_KEY_MESSAGE3   @"MESSAGE3"


#if 0
#define URL_HOST        @"http://54.238.236.177/inspect/api/"
#else
#define URL_HOST        @"http://52.0.170.190/"
#endif
#define ACTION_AUTH     @"MobileMainSys/api/a0020AppLicense_authenticate.action"
#define ACTION_SEND     @"MobileMainSys/api/a0030CheckListRegister_update.action"
#define ACTION_PRICE    @"MobileMainSys/api/a0050KariPriceConfirm_confirm.action"

#define API_PRICE      [NSString stringWithFormat:@"%@%@", URL_HOST, ACTION_PRICE]
#define API_SEND       [NSString stringWithFormat:@"%@%@", URL_HOST, ACTION_SEND]
#define API_AUTH       [NSString stringWithFormat:@"%@%@", URL_HOST, ACTION_AUTH]

#endif
